#include<iostream>
#include<string>
#include<vector>
using namespace std;

class Solution {
public:
    string _numstr[10] = { "", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz" };
    void Combine(const string& digits, int di, string cbstr, vector<string>& v)
    {
        if (di == digits.size())
        {
            v.push_back(cbstr);
            return;
        }
        int num = digits[di] - '0';
        string s = _numstr[num];
        for (int i = 0; i < s.size(); i++)
        {
            Combine(digits, di + 1, cbstr + s[i], v);
        }

    }
    vector<string> letterCombinations(string digits)
    {
        vector<string> v;
        if (digits.empty())
            return v;
        Combine(digits, 0, "", v);
        return v;
    }
};
int main()
{
    Solution obj;
    obj.letterCombinations("23");
    return 0;
}